<?php

class Multimedia_model extends CI_Model {
    
    function Multimedia_model() {
        $this->load->library('api/services/Multimedia');
    }
    
    function multimedia_get($multimedia_id) {
        $data = Multimedia::multimediaGet($multimedia_id);
        
        if(!empty($data)) return true;
        else return false;
    }    
    
    function multimedia_set($member_id, $name, $type, $url) {
        return Multimedia::multimediaSet($member_id, $name, $type, $url);
    }
    
    function multimedia_menu_set($member_id, $menu_id, $name, $type, $url) {
        return Multimedia::multimediaMenuSet($member_id, $menu_id, $name, $type, $url);
    }
    
    function multimedia_delete($multimedia_id) {
        return Multimedia::multimediaDelete($multimedia_id);
    }    
    
    function multimedia_list() {
        $data = Multimedia::multimediaList();
        
        if(!empty($data)) return $data;
        else return false;        
    }

    function multimedia_home_list() {
        $data = Multimedia::multimediaHomeList();
        
        if(!empty($data)) return $data;
        else return false;        
    }
    
    function multimedia_menu_home_list($menu_id) {
        $data = Multimedia::multimediaMenuHomeList($menu_id);
        
        if(!empty($data)) return $data;
        else return false;        
    }    
    
    function multimedia_menu_list($menu_id) {
        $data = Multimedia::multimediaMenuList($menu_id);
        
        if(!empty($data)) return $data;
        else return false;        
    }    

}

?>
